﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace socialNetwork.Models
{
    public class Post {
        [Key]
        public int PostId { get; set; }
        public int? UserId { get; set; }
        public string PostTitle { get; set; }
        public string PostBody { get; set; }
        public DateTime? CreateDate { get; set; }
        public DateTime? ModifyDate { get; set; }
        public virtual ICollection<Comment> Comments { get; set; }
    }

    public class Comment {
        [Key]
        public int CommentId { get; set; }
        public int? PostId { get; set; }
        public int? UserId { get; set; }
        public DateTime? CreateDate { get; set; }
        public DateTime? ModifyDate { get; set; }
    }

    public class Message {
        [Key]
        public int MessageId { get; set; }
        public int? SenderId { get; set; }
        public int? RecipientId { get; set; }
        public string MessageBody { get; set; }
        public DateTime? CreateDate { get; set; }
    }

    public class Friend {
        public int UserId { get; set; }
        public int FriendId { get; set; }
    }
}